package org.example.liushichuanshu;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class ServerHandler extends SimpleChannelInboundHandler<String> {

    @Override
    protected void channelRead0(ChannelHandlerContext context, String msg) throws Exception {
        System.out.println("客户端发送到服务器的数据: " + msg);
        context.writeAndFlush("当行星遇见了月亮会发生什么");
    }
}
